package com.itcast.feign.feignclient;

import com.itcast.feign.config.FeignClientConfiguration;
import com.itcast.feign.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 使用Feign调用接口
 */
@FeignClient(value = "userservice") //服务名称，记录日志的级别(configuration = FeignClientConfiguration.class)
public interface UserClient {

    @GetMapping("/user/{id}")
    User findById(@PathVariable("id") Long id);

}
